
from mini_tools.mytools import *
from config import *
from sql import sqlseverDB

ms = sqlseverDB('{SQL Server}', SQL_SERVER, 'sumaitongpol', SQL_USER,SQL_PWD)

def main():
    sqlstr='''select * from ProShopeePh where id in (select min(id) from ProShopeePh where rcurl is not null group by itemid) order by url desc
    '''

    fqz='入仓汇总2'
    cur_map=DBO_MAP.get('ProShopeePh')
    fname=sqlToExcel(fqz,ms,sqlstr,dbpmap=cur_map)

main()


    